<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>我的消息</title>
<jsp:include page="../head.jsp" />
<script type="text/javascript">

	function readMessage(){
		$.ajax({
				url			:"<%=path%>/message/messageAjax_readMessage_msgAction.action",
				type 		: "POST",
				dataType 	: "json",
				data		: {
					"messageId" : ${message.messageId}
				},
				success 	: function(data) {
					parent.j_search(1);
					parent.closeSearchBox();
				},
				error		:function(){
					xbox.alert("数据正在提交，请稍候，或检查您的网络环境,确保其连接正常！");
				}
			});
	}
	function turnBack(){
		parent.j_search(1);
		parent.closeSearchBox();
	}

</script>

</head>
<body>
<table width="98%" align="center" border="0" cellpadding="4" cellspacing="1" bgcolor="#F1F1F1" style="margin-bottom:8px">
  <tr bgcolor="#FFFFFF">
    <td colspan="4" height="16"><span></span></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="10%" align="right" bgcolor="#FFFFFF">收件人：</td>
    <td width="90%" colspan="3" align="left" bgcolor="#FFFFFF">
        
            
              <input style="width:20%" type="text" readonly="readonly" value="${message.receiver.realName}" />
             
            </div>
          </div>
    </td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="10%" align="right" bgcolor="#FFFFFF">消息内容：</td>
    <td width="90%" colspan="3" align="left" bgcolor="#FFFFFF">
     <textarea rows="3" readonly="readonly">${message.messageContent}</textarea>
    </td>
  </tr>
  <tr align="right" bgcolor="#F1F1F1">
	<td height="36" colspan="4" align="center">
		<input type='button' class="btn" onclick="readMessage();" value='已读' />
	    &nbsp;<input type='button' class="btn" onclick="turnBack();" value='返回' />
</td>
</tr>
</table>
</body>
</html>
